﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WPS.Modules.StyleLibrary
{
	public interface IStyleLibraryIntegration
	{
		/// <summary>
		/// Checks whether the current user is allowed to use the Style Library.
		/// </summary>
		/// <returns>True if all OK, false otherwise.</returns>
		bool CheckAccess();

		/// <summary>
		/// Returns an URL where the non-authenticated users should be redirected.
		/// </summary>
		/// <returns>URL.</returns>
		string GetLoginPage();

		/// <summary>
		/// Returns the web path to the CSS file edited in Style Library.
		/// </summary>
		/// <returns></returns>
		string GetEditableCssWebPath();

		/// <summary>
		/// Returns the web path to the CSS file used for creating new styles.
		/// </summary>
		string GetExampleCssWebPath();

		/// <summary>
		/// Gets the revision number of the edited CSS file, to append with get
		/// query paramter, to avoid viewing cached version.
		/// </summary>
		/// <returns>The revision number to use in query string ?rev=X</returns>
		int GetEditableCssRevision();

		/// <summary>
		/// Stores the revision number of the edited CSS file, to append with get
		/// query paramter, to avoid viewing cached version.
		/// </summary>
		void SetEditableCssRevision();

		/// <summary>
		/// Increments the revision number of the edited CSS file, to append with get
		/// query paramter, to avoid viewing cached version.
		/// </summary>
		/// <returns>The new revision number to use in query string ?rev=X.</returns>
		int IncrementEditableCssRevision();
	}
}
